home *** CD-ROM | disk | FTP | other *** search
/ Software of the Month Club 1996 June / Software of the Month Club 1996 June.iso / mac / ISO9660 / WIN / SRI / RAYTRACE / QCKTOUR6.RSC < prev    next >
Text File  |  1995-09-07  |  4KB  |  186 lines

  1. .run_from qcktour5.rsc
  2. .file_new
  3. .control_key_up
  4. .new_text
  5. This example will demonstrate ray paths through a rectangular
  6. refracting slab.
  7.  
  8.  
  9. Click on Yes to see this example, click on No to skip to the next example.
  10. .yes_no OK SKIP
  11. :OK
  12. .create_element
  13. .fast_click 400 200
  14. .fast_click 150 200
  15. .fast_click 150 120
  16. .fast_click 400 120
  17. .region
  18. .set_length 120
  19. .create_ray
  20. .fast_click 190 280
  21. .fast_click 280 175
  22. .finish
  23. .pause 500
  24. .new_text
  25. The ray paths can be controlled at every boundary by setting the "fertility"
  26. of the rays. This is done by selecting the ray and using the Modify -- Ray menu item.
  27.  
  28.  
  29. Press the space bar to see a normal and reflected ray generated at the top surface
  30. of the slab.
  31. .pause
  32. .move 210 258
  33. .pause 400
  34. .click 210 258
  35. .pause 400
  36. .reflect
  37. .pause 300
  38. .normal
  39. .new_text
  40. The ray can also be projected across the slab.
  41.  
  42.  
  43. Press the space bar to see a forward projected ray.
  44. .pause
  45. .forward_project
  46. .new_text
  47. You might also be interested in the reflection of the lower surface of the
  48. slab.
  49.  
  50.  
  51. Press the space bar to see this.
  52. .pause
  53. .move 282 152
  54. .pause 400
  55. .click 282 152
  56. .pause 400
  57. .reflect
  58. .pause 1000
  59. .new_text
  60. Now that the basic ray diagram is set up, various parts can be dragged about.
  61.  
  62.  
  63. For example the thickness of the slab can be changed.
  64.  
  65.  
  66. Press the space bar to see this.
  67. .pause
  68. .new_text
  69. The slab must be selected by clicking somewhere on its outline.
  70. .pause 500
  71. .move 400 150
  72. .pause 1000
  73. .click 400 150
  74. .pause 1000
  75. .new_text
  76. To drag an edge the control key is held down while clicking on the edge.
  77.  
  78.  
  79. Press the space bar to continue.
  80. .pause
  81. .control_key_down
  82. .move 250 120
  83. .pause 500
  84. .click 250 120
  85. .control_key_up
  86. .pause 500
  87. .new_text
  88. Now the cursor is in the drag form the edge can be moved about.
  89.  
  90.  
  91. Press the space bar to continue.
  92. .pause
  93. .move 250 80
  94. .pause 500
  95. .move 250 120
  96. .pause 500
  97. .new_text
  98. Try moving the cursor now to drag the edge.
  99.  
  100.  
  101. Notice how the displacement of the transmitted ray varies with
  102. the thickness of the slab.
  103.  
  104.  
  105. Click on the primary mouse button to return to the script.
  106. .mouse_limits 240 70 260 220
  107. .allow_drag
  108. .click 250 120
  109. .new_text
  110. Or you could change the slab so that the top and bottom were not parallel by dragging
  111. one of the vertices.
  112.  
  113.  
  114. Press the space bar to see this.
  115. .pause
  116. .move 400 120
  117. .pause 500
  118. .click 400 120
  119. .pause 500
  120. .move 400 100
  121. .new_text
  122. Try moving the cursor now to drag the vertex.
  123.  
  124.  
  125. Click on the primary mouse button to return to the script.
  126. .mouse_limits 390 80 410 180
  127. .allow_drag
  128. .click 400 120
  129. .new_text
  130. A protractor can be used to measure the angle of incidence and
  131. a tape measure can be used to measure the lateral displacement
  132. of the transmitted ray.
  133.  
  134.  
  135. Press the space bar to continue.
  136. .pause
  137. .quiet_snap
  138. .create_protractor
  139. .end_snap
  140. .fast_click 208 259
  141. .end_snap
  142. .fast_click 258 260
  143. .mid_snap
  144. .fast_click 208 259
  145. .new_text
  146. .fast_click 241 220
  147. .protractor_options 0 leader degrees
  148. .fast_click 270 211
  149. .fast_click 116 217
  150. .create_tapemeasure
  151. .mid_snap
  152. .fast_click 324 87
  153. .perp_snap
  154. .fast_click 349 95
  155. .fast_click 346 83
  156. .tapemeasure_options 1 0 leader distance
  157. .fast_click 354 93
  158. .fast_click 450 90
  159. .fast_click 230 70
  160. .new_text
  161. Press the space bar to gain control of Raytrace and try dragging the slab
  162. or the incident ray about.
  163. .pause
  164. .new_text
  165. Remember:
  166.  
  167.  
  168.      Select an object by clicking on its outline.
  169.  
  170.      Drag the selected object by clicking on it again.
  171.  
  172.      Use the control key when clicking to drag an edge.
  173.  
  174.  
  175. Click on the Continue button to return to the script.
  176. .user_control
  177. .new_text
  178. That's the end of this example. A similar ray diagram is available
  179. in the file SLAB.RAY which you can load and modify later.
  180.  
  181.  
  182. Press the space bar to go to the next example.
  183. .pause
  184. :SKIP
  185. .script qcktour7.rsc
  186.